package com.poorstu.dao.impl;

import java.util.List;

import com.common.base.dao.impl.BaseDaoImpl;
import com.poorstu.dao.FileDao;
import com.poorstu.model.FilesMod;

public class FileDaoImpl extends BaseDaoImpl implements FileDao {

	public void saveFile(FilesMod file) {
		
		super.save(file);
		
	}

	public List<FilesMod> selectFiles() {
		
		return super.findAll("FilesMod");
	}

	public FilesMod selectFileById(int fileId) {
		
		return (FilesMod)super.findByHql("from FilesMod where fileId="+fileId).get(0);
	}

	public List<FilesMod> selectFileByName(String name) {
		return super.findByHql("from FilesMod where fileName="+name);
	}
	
	
	
	
	

}
